/* 
 * File:   MenuGS.cpp
 * Author: Semidán Acosta Betancor
 * 
 * Created on 18 de septiembre de 2011, 19:35
 */

#include "MenuGS.h"
#include "ESResourceManager.h"

using namespace std;

const int MenuGS::Num_Options = 5;

MenuGS::MenuGS()
{
}

MenuGS::~MenuGS()
{
}

void MenuGS::handleEvents(sf::RenderWindow& window)
{
    sf::Event event;
    window.PollEvent(event);
    if (event.Type == sf::Event::Closed)
    {
        exit(0);
    }
}

void MenuGS::update(sf::RenderWindow& window)
{
}

void MenuGS::draw(sf::RenderWindow& window)
{
    window.Clear(sf::Color::Black);
    window.Display();
}

void MenuGS::init()
{
    ee::ESResourceManager *resourceManager = ee::ESResourceManager::instance();

    if (resourceManager == NULL)
    {
        //TODO something really nasty occur, throw exception or assert
    }

    resourceManager->setGraphicRootDir("resources/images");
    resourceManager->setFontRootDir("resources/fonts");

    backGroundImage = resourceManager->loadImage("background.png");
    titleImage = resourceManager->loadImage("title.png");
    
    menuFont = resourceManager->loadFont("Yukon Font.ttf");
}

void MenuGS::cleanup()
{
    ee::ESResourceManager::instance()->clearResources();
}

void MenuGS::resume()
{

}

void MenuGS::pause()
{

}

